/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.ipti.br.tag.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 *
 * @author israel
 */
@Entity
public class City implements Serializable {
    private static final long serialVersionUID = 1L;
    
    @Id
    @Column(name="hash_id")
    private Long id;
    
    @Column(length=60)
    private String name;
    
    @Column(length=40)
    private String abbreviation;
    
    private String uf;
    
    @ManyToOne
    @JoinColumn(name="state_id")
    private State state;

    public City() {
    }

    public City(String name, String abbreviation, String uf, State state) {
        this.name = name;
        this.abbreviation = abbreviation;
        this.uf = uf;
        this.state = state;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getAbbreviation() {
        return abbreviation;
    }

    public void setAbbreviation(String abbreviation) {
        this.abbreviation = abbreviation;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
    }

    public String getUf() {
        return uf;
    }

    public void setUf(String uf) {
        this.uf = uf;
    }
    
}
